# -*- coding: utf-8 -*-
# @Time : 2022/4/9 20:59
# @Author : Liuqing
# @File : 20_枚举.py
# @Software : PyCharm
lst = ['a', 'b', 'c', 'd']

for index, element in enumerate(lst):
    print("Value: ", element, " ==> Index: ", index)

lst2 = [1, 2, 3, 4, 5, 6]
for k, v in enumerate(lst2):
    if k % 2 == 0:
        print("v**2 ==> ", v**2)
    else:
        print("v ==> ", v)
